Browse Source

Large buffer for klishd too

Serj Kalichev 6 months ago
parent
commit
74b90d9b65
1 changed files with 4 additions and 0 deletions
  1. 4 0
      klish/ktp/ktpd_session.c

+ 4 - 0
klish/ktp/ktpd_session.c

@@ -101,6 +101,10 @@ ktpd_session_t *ktpd_session_new(int sock, kscheme_t *scheme,
 	// Async object
 	ktpd->async = faux_async_new(sock);
 	assert(ktpd->async);
+	// Workaround. Make buffer a large else we have lost stdin
+	// TODO: It must be refactored. So large buffer is bad idea
+	faux_async_set_write_overflow(ktpd->async, 1000000000l);
+	faux_async_set_read_overflow(ktpd->async, 1000000000l);
 	// Receive message header first
 	faux_async_set_read_limits(ktpd->async,
 		sizeof(faux_hdr_t), sizeof(faux_hdr_t));