File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -73,11 +73,19 @@ fn process_server_reader(reader: impl std::io::Read,
73
73
}
74
74
if let Some ( ref bytecode_options) = bytecode_options {
75
75
let json_val = json:: from_str ( & msg) ?;
76
- if let Ok ( bytecode_str) = bytecode:: generate_bytecode_repl ( & json_val, bytecode_options. clone ( ) ) {
77
- channel_pub. send ( bytecode_str) ?;
78
- continue
76
+ match bytecode:: generate_bytecode_repl ( & json_val, bytecode_options. clone ( ) ) {
77
+ Ok ( bytecode_str) => {
78
+ debug ! ( "server->client: json {} bytes; converted to bytecode, {} bytes" ,
79
+ msg. len( ) , bytecode_str. len( ) ) ;
80
+ channel_pub. send ( bytecode_str) ?;
81
+ continue
82
+ } ,
83
+ Err ( err) => {
84
+ warn ! ( "Failed to convert json to bytecode: {}" , err) ;
85
+ } ,
79
86
}
80
87
}
88
+ debug ! ( "server->client: json {} bytes; forward as-is" , msg. len( ) ) ;
81
89
channel_pub. send ( msg) ?;
82
90
}
83
91
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments