Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    socket closed after few minutes

    Bugs
    0
    4
    19
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pratima last edited by

      Re: socket closed after few minutes

      My WebSocket connection in Node.js works fine initially, fetching data as expected. However, after around 1.5 hours, the connection inexplicably drops while the Node.js server remains running. To resume data fetching, I have to manually stop and restart the Node.js server. How can I address this issue?

      C M 2 Replies Last reply Reply Quote 0
      • C
        chetansuri @pratima last edited by

        @pratima you should do some error handling within your node.js code and let it reconnect if it disconnect anytime. there will be some missing data when websocket disconnect and reconnect but disconnection handling should be done within your code

        J 1 Reply Last reply Reply Quote 0
        • M
          Moderator_3 @pratima last edited by

          Hello @pratima
          please do error handling from your side and also please share your code
          Regards,
          SmartAPI Team

          1 Reply Last reply Reply Quote 0
          • J
            jaideep siddula @chetansuri last edited by

            @chetansuri Well said!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post