Socket.io WebSocketWriter.writeClose() give IllegalArgumentException

Crashed: OkHttp http://17.176.117.92:3007/socket.io/?EIO=3&transport=websocket&sid=P5vRfdWExfmHPuAAAV WebSocket
at com.squareup.okhttp.internal.ws.WebSocketWriter.writeClose(WebSocketWriter.java:110)
at com.squareup.okhttp.internal.ws.RealWebSocket.peerClose(RealWebSocket.java:146)
at com.squareup.okhttp.internal.ws.RealWebSocket.access$100(RealWebSocket.java:31)
at com.squareup.okhttp.internal.ws.RealWebSocket$1$2.execute(RealWebSocket.java:74) 
at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)

--

Fatal Exception: java.lang.IllegalArgumentException: Code required to include reason.
at com.squareup.okhttp.internal.ws.WebSocketWriter.writeClose(WebSocketWriter.java:110)
at com.squareup.okhttp.internal.ws.RealWebSocket.peerClose(RealWebSocket.java:146)
at com.squareup.okhttp.internal.ws.RealWebSocket.access$100(RealWebSocket.java:31)
at com.squareup.okhttp.internal.ws.RealWebSocket$1$2.execute(RealWebSocket.java:74)
at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)

i can only see in fabrics crashlytics, the users are facing this crash, but i have no idea why this is coming up, most probably it has something related to webSocket.Writer.writeClose. How to fix this ?