When I connect the grpc server锛宨t's can keep long connect锛宎nd use debug锛宨t's return
MozXHR.onStateChange 3
MozXHR.XMLHttpRequest.HEADERS_RECEIVED 2
MozXHR.onProgressEvent:
Uint8Array [ 0, 0, 0, 0, 0 ]
rawOnMessage
Object { value: false }
But when it's 10 seconds锛宨t's return
MozXHR.onStateChange 4
MozXHR.XMLHttpRequest.HEADERS_RECEIVED 2
MozXHR.onLoadEvent
grpc.onEnd
grpc.headers only response null
Array []
rawOnEnd 13 Response closed without grpc-status (Headers only)
Object { headersMap: {鈥 }
GRPCrequest.onEnd 13 Response closed without grpc-status (Headers only)
Object { headersMap: {鈥 }
I want to maintain a long-term connection. Is there any way?
It's the grpcwebproxy timeout setting锛宯eed set it on server
@AaronJin2013 Thank you for posting the solution, I ran into this issue as well. More specifically, you can set the --server_http_max_write_timeout command-line flag to a value that time.ParseDuration can read. I set it to 1h in my case.
Most helpful comment
@AaronJin2013 Thank you for posting the solution, I ran into this issue as well. More specifically, you can set the
--server_http_max_write_timeoutcommand-line flag to a value that time.ParseDuration can read. I set it to1hin my case.